<template>
	<view>
		<!-- 文字 -->
		<view class="introduce">
			<view class="introduce-breadcrumbs" v-for="item in infodata" :key="item.id">
				<image src="../../static/社区.png" mode=""></image>
				<text>{{item.user}}</text>
			</view>
			<view class="title">{{listdata.list}}</view>
			<view class="introduce-breadcrumbs">
				<image src="../../static/社区.png" mode=""></image>
				<text>11111</text>
			</view>
			<view class="hint">{{listdata.illness}}</view>
		</view>
		<!-- 图片 -->
		<view class="caption">
			<image :src="listdata.img" mode=""></image>
		</view>
		<view class="btn">疗效显著，立即分享</view>
	</view>
</template>

<script>
	import axios from "../../bower_components/axios/dist/axios.js";
	export default {
		data() {
			return {
				id: 0,
				cid: 0,
				listid: 0,
				infodata: [],
				listdata: []
			};
		},
		onLoad(e) {
			this.id = e.id
			this.cid = e.cid
			this.listid = e.listid
			this.getinfo()
		},
		methods: {
			getinfo() {
				axios.get("/user/list").then((res) => {
					let info = this.infodata = res.data.data.filter(i => {
						return i.id == this.id
					})
					let title = this.titledata = info[0].title.filter(i => {
						return i.id == this.cid
					})
					let list = title[0].listdata.filter(i => {
						return i.id == this.listid
					})
					find()
					this.listdata = list[0]
					// 动态标题
					uni.setNavigationBarTitle({
						title: list[0].list
					});
				});
			},
		}
	}
</script>

<style lang="scss">
	.introduce {
		padding: 40rpx;

		.introduce-breadcrumbs {
			display: flex;
			align-items: center;
			color: #00aa00;

			image {
				width: 40rpx;
				height: 40rpx;
				margin-right: 10rpx;
			}

			text {}
		}

		.title {
			font-size: 70rpx;
			margin: 20rpx 0;
		}

		.hint {
			color: #818181;
		}
	}

	.caption {
		margin: 0 auto;
		width: 95%;
		height: 800rpx;
		margin-bottom: 30rpx;
		box-shadow: 2px 2px 2px 3px #eaeaea;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.btn {
		margin: 0 auto;
		width: 400rpx;
		height: 80rpx;
		background-color: #35BF72;
		border-radius: 30px;
		text-align: center;
		line-height: 80rpx;
		color: #fff;
	}
</style>
